package com.bnzj.cloud.business.core.persistence.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;

import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.File;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 富
 * @date 2020/5/8 18:53
 */
@EnableJpaAuditing
@EntityListeners(AuditingEntityListener.class)
@Getter
@Setter
@ToString(callSuper = true)
@Entity
@Table(name = "bnz_group")
@Schema(description = "机构")
@AllArgsConstructor
@NoArgsConstructor
@Data
public class Group implements Serializable {
    private static final long serialVersionUID = -1867411475978990633L;

    @Id
    @Schema(description = "主id")
    private Long id;

    @Schema(description = "编码")
    private String code;

    @Schema(description = "机构名称")
    private String gname;

    @Schema(description = "简称")
    private String sname;

    @Schema(description = "邮箱地址")
    private String email;

    @Schema(description = "电话")
    private String phone;

    @Schema(description = "公司地址")
    private String address;

    @Schema(description = "负责人")
    private String chargeName;

    @Schema(description = "负责人电话")
    private String chargePhone;

    @Schema(description = "备注")
    private String remark;

    @Schema(description = "启用状态")
    private Integer enabled;


    @Schema(description = "创建人工号")
    private String creator;

    @CreatedDate
    @Schema(description = "创建时间")
    private Date createTime;

    @LastModifiedBy
    @Schema(description = "修改人工号")
    private String modifyBy;

    @LastModifiedDate
    @Schema(description = "修改时间")
    private Date modifyTime;


    @Schema(description = "创建人")
    private String creatorName;

    @Schema(description = "修改人")
    private String modifyName;
}